package screens;

import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.Font;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;

import javax.swing.BoxLayout;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JSeparator;

import main.Fonts;
import main.UserInterface;

public class HaveWeMetBefore extends JPanel implements MouseListener {
	
	private JLabel label;
	private JButton yes;
	private JButton no;

	public HaveWeMetBefore() {
		
		setPreferredSize(new Dimension(800, 600));
		setLayout(new FlowLayout());
		
		yes = new JButton("YES");
		yes.setPreferredSize(new Dimension(400, 300));
		yes.setFont(Fonts.default_font(48));
		no = new JButton("NO");
		no.setPreferredSize(new Dimension(400, 300));
		no.setFont(Fonts.default_font(48));
		label = new JLabel("HAVE WE MET BEFORE?", JLabel.CENTER);
		label.setFont(Fonts.default_font(64));
		label.setPreferredSize(new Dimension(800, 300));
		
		JPanel buttons = new JPanel();
		buttons.setLayout(new FlowLayout());
		
		buttons.add(yes);		
		buttons.add(no);
		
		add(label);
		add(buttons);
		
        yes.addMouseListener(this);
        no.addMouseListener(this);
	}
	
	public JPanel getContentPane() {
		return this;
	}

	@Override
	public void mouseClicked(MouseEvent e) {
		if (e.getSource().equals(yes)) {
			UserInterface.setContentPane(UserInterface.simulatorPanel);
		} else {
			UserInterface.setContentPane(UserInterface.demo);
		}
	}

	@Override
	public void mouseEntered(MouseEvent e) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void mouseExited(MouseEvent e) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void mousePressed(MouseEvent e) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void mouseReleased(MouseEvent e) {
		// TODO Auto-generated method stub
		
	}
}
